package com.haizhi.crm.sys.message.dao;

import com.haizhi.crm.sys.message.model.MessageSettingDo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by wangshan on 2018/5/16.
 */
@Transactional
@Repository
public interface MessageSettingDao extends JpaRepository<MessageSettingDo, Long> {

    List<MessageSettingDo> findByUserIdAndMsgCategoryId(Long userId, Long msgCategoryId);

    void deleteByUserId(Long userId);

}
